package com.training.collection.jdk15;

import java.awt.List;
import java.util.ArrayList;

import javax.swing.text.html.HTMLDocument.Iterator;

import com.training.java.core.collection.Car;

public class CollectionDemo1 {

	public static void main(String[] args) {

		java.util.List<Car>Cars=new ArrayList<>();
		
		
		Car car1=new Car("1234", "FORD", "Focus");
		Car car2= new Car("5678", "Toyota", "Camry");
		Car car3=new Car("6789", "Chevy", "Malibu");
		
		Cars.add(car1);
		Cars.add(car2);
		Cars.add(car3);
		
		for(Car C:Cars)
		{
			System.out.println("VinNumber Is :- "+C.getVinNumber());
			System.out.println("Make Is :- "+C.getMake());
			System.out.println("Model Is :- "+C.getModel());
			System.out.println("___________________");
			
		}
		
		
	}

}
